﻿<!DOCTYPE html>
<html>
<head>
    <title>管理后台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    @JinianNet.Web.ResourceManager.Script.Render("Manage/Base")
    @JinianNet.Web.ResourceManager.Style.Render("Manage/Base")
    <style type="text/css">
        html, body {
            margin: 0px;
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div id="head">
        <strong>JNCMS后台管理</strong>
    </div>
    <div id="nav">
        <div class="menu">
            <ul>
                <li><a href="javascript:void(0)" onclick="menuclick(this,1);">基础设置</a></li>
                <li><a href="javascript:void(0)" onclick="menuclick(this,2);">内容管理</a></li>
                <li><a href="javascript:void(0)" onclick="menuclick(this,3);">模块管理</a></li>
                <li><a href="javascript:void(0)" onclick="menuclick(this,4);">会员管理</a></li>
                <li><a href="javascript:void(0)" onclick="menuclick(this,5);">功能管理</a></li>
                <li><a href="javascript:void(0)" onclick="menuclick(this,6);">个人中心</a></li>
                <li><a href="../Logout.aspx?url=Default.aspx" target="_parent">安全退出</a></li>
            </ul>
        </div>

        <div class="small" id="MessageBox">
            <span>数据获取中！</span>
        </div>
    </div>

    <div id="frame">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="150" valign="top" id="shortcut">
            <div class="li" id="item_1">
                <ul>
                    <li><a href="/Manage/Setting" target="FrameRight">网站设置</a></li>
                    <li><a target="FrameRight" href="/Manage/Category/List">修改密码</a></li>
                    <li><a href="../Logout.aspx?url=Default.aspx" target="_parent">安全退出</a></li>
                    <li><a target="_blank" href="http://www.JinianNet.com">官方网站</a></li>
                </ul>
            </div>
            <div class="li hidden" id="item_2">
                <ul>
                    <li>
                        <div><a target="FrameRight" href="/Manage/Category/List">栏目管理</a></div>
                        <div>| <a target="FrameRight" href="/Manage/Category/Insert">添加</a></div>
                    </li>
                    @for (int i = 0; i < ViewBag.Category.Count; i++)
                    {
                        JinianNet.JNCms.Models.Category item = ViewBag.Category[i];
                        if (item.IsVerify)
                        {
                        <li>
                            @if (item.IsUrl)
                            {
                                <div>

                                    @if (item.Depth > 0)
                                    {
                                        @(new MvcHtmlString("".PadLeft(item.Depth, ' ').Replace(" ", "&nbsp;")));
                                                                                                                if (i < ViewBag.Category.Count - 1)
                                                                                                                {
                                                                                                                    JinianNet.JNCms.Models.Category next = ViewBag.Category[i + 1];
                                                                                                                    if (item.Depth == next.Depth)
                                                                                                                    {
                                        <span>├</span>
                                                                                                                    }
                                                                                                                    else
                                                                                                                    {
                                        <span>└</span>
                                                                                                                    }
                                                                                                                }
                                                                                                                else
                                                                                                                {
                                        <span>└</span>
                                                                                                                }
                                    }
                                    <a target="FrameRight" href="@item.Url">@item.Title</a>
                                </div> <div></div>
                            }
                            else
                            {
                                <div>
                                    @if (item.Depth > 0)
                                    {
                                        @(new MvcHtmlString("".PadLeft(item.Depth, ' ').Replace(" ", "&nbsp;")));
                                                                                                                if (i < ViewBag.Category.Count - 1)
                                                                                                                {
                                                                                                                    JinianNet.JNCms.Models.Category next = ViewBag.Category[i + 1];
                                                                                                                    if (item.Depth == next.Depth)
                                                                                                                    {
                                        <span>├</span>
                                                                                                                    }
                                                                                                                    else
                                                                                                                    {
                                        <span>└</span>
                                                                                                                    }
                                                                                                                }
                                                                                                                else
                                                                                                                {
                                        <span>└</span>
                                                                                                                }
                                    }
                                    <a target="FrameRight" href="/Manage/Article/List/@item.KeyName">@item.Title</a>
                                </div> <div>
                                    | <a target="FrameRight" href="/Manage/Article/Insert/@item.KeyName">添加</a> <a target="FrameRight" href="/Manage/Category/List/@item.ID">子项</a>

                                </div>
                            }
                        </li>
                        }

                    }
                </ul>
            </div>
            <div class="li hidden" id="item_3">
                <ul>
                    <li>
                        <div><a href="/Manage/Classify/List/1" target="FrameRight">模块列表</a></div>
                        <div>| <a target="FrameRight" href="/Manage/Classify/Insert/1">添加</a></div>
                    </li>
                    @for (int i = 0; i < ViewBag.ModuleClassify.Count; i++)
                    {
                        <li>
                            <div><a target="FrameRight" href="/Manage/Content/List/@ViewBag.ModuleClassify[i].ID">@ViewBag.ModuleClassify[i].Title</a></div>
                            <div>| <a target="FrameRight" href="/Manage/Content/Insert/@ViewBag.ModuleClassify[i].ID">添加</a> <a target="FrameRight" href="/Manage/Classify/Edit/@ViewBag.ModuleClassify[i].ID">设置</a></div>
                        </li>
                    }

                </ul>
            </div>
            <div class="li hidden" id="item_4">
                <ul>
                </ul>
            </div>
            <div class="li hidden" id="item_5">
                <ul>
                    <li>
                        <div><a href="/Manage/Attachment/List" target="FrameRight">文件管理</a></div>
                        <div>| <a target="FrameRight" href="/Manage/Attachment/Insert">上传</a></div>
                    </li>
                    <li>
                        <div><a href="/Manage/Template/List" target="FrameRight">模板管理</a></div>
                        <div>| <a target="FrameRight" href="/Manage/Template/Service">下载</a></div>
                    </li>
                    <li>
                        <div><a href="/Manage/Links/List" target="FrameRight">友情链接</a></div>
                        <div>| <a target="FrameRight" href="/Manage/Links/Insert">添加</a>  <a target="FrameRight" href="/Manage/Classify/List/2">分类</a></div>
                    </li>
                    <li>
                        <div><a href="#" target="FrameRight">留言管理</a></div>
                        <div>| <a target="FrameRight" href="#">添加</a></div>
                    </li>
                </ul>
            </div>
            <div class="li hidden" id="item_6">
                <ul>
                </ul>
            </div>
                </td>
                <td width="7" class="dominate">

                </td>
                <td valign="top" id="ContentList">
                    <iframe src="Index" scrolling="yes" width="100%" frameborder="0" id="FrameRight" height="100%" name="FrameRight"></iframe>
                </td>
            </tr>
        </table>
    </div>

    <script>
        function menuclick(obj, index) {
            $(".li").hide();
            $("#item_" + index).show();
        }
        function ServerMessage(json) {
            if (json.length > 0) {
                $("#MessageBox").html('[' + json[0].Date + '] <a href="' + json[0].Url + '" target="_blank">' + json[0].Title + '</a>');
            }
        }
        (function () {
            var h = document.body.clientHeight - 120;
            $("#ContentList").height((h - 5) + "px");
            $.getScript('@(JinianNet.JNCms.Config.Read("Server", true)["Message"])1-1-ServerMessage');
        })();
    </script>
</body>
</html>
